<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>作业3</title>
</head>

<body>
    <pre>
        3、使用模式"\s"将字符串去掉空格输出
        var str="no  zuo no die no can no bibi";
    </pre>

    <script>
        var str = "no  zuo no die no can no bibi";
        var a = str.replace(/\s/g, "");
        console.log(a);
    </script>
</body>

</html>